//
//  XJTiXianAmountCell.m
//  XinJiangMall
//
//  Created by RaoBo on 2018/5/24.
//  Copyright © 2018年 Tzyang. All rights reserved.
//  提现金额

#import "XJTiXianAmountCell.h"
@interface XJTiXianAmountCell()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *moneyTextField; // 提现金额

@end
@implementation XJTiXianAmountCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [_moneyTextField addTarget:self action:@selector(moneyTextFieldAction:) forControlEvents:(UIControlEventEditingChanged)];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - 回调事件
// 全部提现
- (IBAction)allTixianButtonAction:(UIButton *)sender {
    if (self.clickAllTiXianButtonBlock) {
        self.clickAllTiXianButtonBlock();
    }
}

- (void)moneyTextFieldAction:(UITextField *)tf {
    
    if (self.moneyTextFieldBlock) {
        self.moneyTextFieldBlock(tf.text);
    }
}


#pragma mark - 二 赋值
- (void)tixianCellPlaceholder:(NSString *)placehold text:(NSString *)text {
    
    self.moneyTextField.placeholder = [NSString stringWithFormat:@"可提现金额%.2f",[placehold floatValue]];
    
    if ([NSString isEmptyString:text]) { return; }
    
    self.moneyTextField.text = text;
}




@end
